package com.example.demo.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.demo.dao.UserDao;
import com.example.demo.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao;
    @Override
    public User login(User user) {
        QueryWrapper<User> map = new QueryWrapper<>();
        map.eq("name",user.getName());
        map.eq("pwd",user.getPwd());
        return userDao.selectOne(map);
    }
}
